@extends('home.parent')
@section('title','询盘配置')
@section('head_js')
@endsection
@section('head_css')
@endsection
@section('content')
<div class="content-wrapper">
<section class="content-header">
	<h1>
		询盘配置
		<small></small>
	</h1>
	<ol class="breadcrumb">
		<li><a href="{{URL('admin')}}"><i class="fa fa-dashboard"></i> 首页</a></li>
		<li class="active">询盘配置</li>
	</ol>
</section>
<style>
.box-body div.header{border:1px solid #d5d5d5;margin:10px 0 0 0;border-bottom: none;color:#717171;}
.box-body div.testall{border:1px solid #d5d5d5;}
.box-body div.testall div{color:#717171;padding-top:20px;}
.box-body div.testall div label{padding: 6px 15px 0 0;text-align:right;margin:0;min-width:160px;}
.box-body div.testall div input{width:50%;display:inline-block;min-width:100px;}
.box-body div.testall div button{margin-right:10px;}
h5{color:red;}
.box-body div.testall div.col-md-12{margin-left:160px;}
@media screen and (max-width: 480px) {
	.box-body div.testall div label{text-align:left;}
	.box-body div.testall div input[type="text"]{width:80%;}
	.box-body div.testall div.col-md-12{margin-left:0;}
}
</style>
<section class="content">
	<div class="row">
		<div class="col-md-12">
			<div class="box box-primary">
				<div class="box-body">
					<!-- 初级配置套餐 star-->
					<div class="form-group col-md-12 header">
						<label for="text"><h4><b>初级配置套餐</b></h4></label>
					</div>
					<div class="form-group col-md-12 testall first">
						<form class="first" action="" method="">
						<div class="form-group col-md-6">
							<label>初级套餐名称：</label>
							<input type="text" class="form-control" name="iqname" value="{{ isset($data['first']['iqname'])?$data['first']['iqname']:'' }}" autocomplete="off" placeholder="请输入套餐名称" maxlength="20">
						</div>
						<div class="form-group col-md-6">
							<label>初级套餐价格：</label>
							<input type="text" class="form-control" name="iqprice" value="{{ isset($data['first']['iqprice'])?$data['first']['iqprice']:'' }}" autocomplete="off" placeholder="请输入套餐价格" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频上传数量：</label>
							<input type="text" class="form-control" name="iqkeymber" value="{{ isset($data['first']['iqkeymber'])?$data['first']['iqkeymber']:'' }}" autocomplete="off" placeholder="请输入关键词数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>询盘数量：</label>
							<input type="text" class="form-control" name="iqnumber" value="{{ isset($data['first']['iqnumber'])?$data['first']['iqnumber']:'' }}" autocomplete="off" placeholder="请输入询盘数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频雷达数量：</label>
							<input type="text" class="form-control" name="iqmonumber" value="{{ isset($data['first']['iqmonumber'])?$data['first']['iqmonumber']:'' }}" autocomplete="off" placeholder="作品监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户雷达数量：</label>
							<input type="text" class="form-control" name="iqtopnumber" value="{{ isset($data['first']['iqtopnumber'])?$data['first']['iqtopnumber']:'' }}" autocomplete="off" placeholder="主页监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>每日询盘上限：</label>
							<input type="text" class="form-control" name="xun_number" value="{{ isset($data['first']['xun_number'])?$data['first']['xun_number']:'' }}" placeholder="每日询盘上限" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户监控数：</label>
							<input type="text" class="form-control" name="info_number" value="{{ isset($data['first']['info_number'])?$data['first']['info_number']:'' }}" placeholder="账户监控数" maxlength="10">
						</div>
						<div class="form-group col-md-12">
							<button type="button" class="btn btn-info" onclick="dataSubmit('first')">保 存</button>
							<button type="reset" class="btn btn-default">重 置</button>
						</div>
						</form>
					</div>
					<!-- 初级配置套餐 end-->
					
					<!-- 中级配置套餐 star-->
					<div class="form-group col-md-12 header">
						<label for="text"><h4><b>中级配置套餐</b></h4></label>
					</div>
					<div class="form-group col-md-12 testall middle">
						<form class="middle" action="" method="">
						<div class="form-group col-md-6">
							<label>中级套餐名称：</label>
							<input type="text" class="form-control" name="iqname" value="{{ isset($data['middle']['iqname'])?$data['middle']['iqname']:'' }}" autocomplete="off" placeholder="请输入套餐名称" maxlength="20">
						</div>
						<div class="form-group col-md-6">
							<label>中级套餐价格：</label>
							<input type="text" class="form-control" name="iqprice" value="{{ isset($data['middle']['iqprice'])?$data['middle']['iqprice']:'' }}" autocomplete="off" placeholder="请输入套餐价格" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频上传数量：</label>
							<input type="text" class="form-control" name="iqkeymber" value="{{ isset($data['middle']['iqkeymber'])?$data['middle']['iqkeymber']:'' }}" autocomplete="off" placeholder="请输入关键词数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>询盘数量：</label>
							<input type="text" class="form-control" name="iqnumber" value="{{ isset($data['middle']['iqnumber'])?$data['middle']['iqnumber']:'' }}" autocomplete="off" placeholder="请输入询盘数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频雷达数量：</label>
							<input type="text" class="form-control" name="iqmonumber" value="{{ isset($data['middle']['iqmonumber'])?$data['middle']['iqmonumber']:'' }}" autocomplete="off" placeholder="作品监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户雷达数量：</label>
							<input type="text" class="form-control" name="iqtopnumber" value="{{ isset($data['middle']['iqtopnumber'])?$data['middle']['iqtopnumber']:'' }}" autocomplete="off" placeholder="主页监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>每日询盘上限：</label>
							<input type="text" class="form-control" name="xun_number" value="{{ isset($data['middle']['xun_number'])?$data['middle']['xun_number']:'' }}" placeholder="每日询盘上限" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户监控数：</label>
							<input type="text" class="form-control" name="info_number" value="{{ isset($data['middle']['info_number'])?$data['middle']['info_number']:'' }}" placeholder="账户监控数" maxlength="10">
						</div>
						<div class="form-group col-md-12">
							<button type="button" class="btn btn-info" onclick="dataSubmit('middle')">保 存</button>
							<button type="reset" class="btn btn-default">重 置</button>
						</div>
						</form>
					</div>
					<!-- 中级配置套餐 end-->
					
					<!-- 高级配置套餐 star-->
					<div class="form-group col-md-12 header">
						<label for="text"><h4><b>高级配置套餐</b></h4></label>
					</div>
					<div class="form-group col-md-12 testall tall">
						<form class="tall" action="" method="">
						<div class="form-group col-md-6">
							<label>高级套餐名称：</label>
							<input type="text" class="form-control" name="iqname" value="{{ isset($data['tall']['iqname'])?$data['tall']['iqname']:'' }}" autocomplete="off" placeholder="请输入套餐名称" maxlength="20">
						</div>
						<div class="form-group col-md-6">
							<label>高级套餐价格：</label>
							<input type="text" class="form-control" name="iqprice" value="{{ isset($data['tall']['iqprice'])?$data['tall']['iqprice']:'' }}" autocomplete="off" placeholder="请输入套餐价格" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频上传数量：</label>
							<input type="text" class="form-control" name="iqkeymber" value="{{ isset($data['tall']['iqkeymber'])?$data['tall']['iqkeymber']:'' }}" autocomplete="off" placeholder="请输入关键词数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>询盘数量：</label>
							<input type="text" class="form-control" name="iqnumber" value="{{ isset($data['tall']['iqnumber'])?$data['tall']['iqnumber']:'' }}" autocomplete="off" placeholder="请输入询盘数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>视频雷达数量：</label>
							<input type="text" class="form-control" name="iqmonumber" value="{{ isset($data['tall']['iqmonumber'])?$data['tall']['iqmonumber']:'' }}" autocomplete="off" placeholder="作品监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户雷达数量：</label>
							<input type="text" class="form-control" name="iqtopnumber" value="{{ isset($data['tall']['iqtopnumber'])?$data['tall']['iqtopnumber']:'' }}" autocomplete="off" placeholder="主页监控数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>每日询盘上限：</label>
							<input type="text" class="form-control" name="xun_number" value="{{ isset($data['tall']['xun_number'])?$data['tall']['xun_number']:'' }}" placeholder="每日询盘上限数量" maxlength="10">
						</div>
						<div class="form-group col-md-6">
							<label>账户监控数：</label>
							<input type="text" class="form-control" name="info_number" value="{{ isset($data['tall']['info_number'])?$data['tall']['info_number']:'' }}" placeholder="账户监控数" maxlength="10">
						</div>
						<div class="form-group col-md-12">
							<button type="button" class="btn btn-info" onclick="dataSubmit('tall')">保 存</button>
							<button type="reset" class="btn btn-default">重 置</button>
						</div>
						</form>
					</div>
					<!-- 高级配置套餐 end-->
				</div>
			</div>
		</div>
	</div>
</section>
</div>
@endsection
@section('foot_js')
<script src="{{ asset('/js/tools.js') }}"></script>
<script type="text/javascript">
/*
保存操作
*/
function dataSubmit(typeName){
	var iqname=$('form.'+typeName+' input[name="iqname"]').val();
	var iqprice=$('form.'+typeName+' input[name="iqprice"]').val();
	var iqkeymber=$('form.'+typeName+' input[name="iqkeymber"]').val();
	var iqnumber=$('form.'+typeName+' input[name="iqnumber"]').val();
	var iqmonumber=$('form.'+typeName+' input[name="iqmonumber"]').val();
	var iqtopnumber=$('form.'+typeName+' input[name="iqtopnumber"]').val();
	var xun_number=$('form.'+typeName+' input[name="xun_number"]').val();
	var info_number=$('form.'+typeName+' input[name="info_number"]').val();
	var data={typeName:typeName,iqname:iqname,iqprice:iqprice,iqkeymber:iqkeymber,iqnumber:iqnumber,iqmonumber:iqmonumber,iqtopnumber:iqtopnumber,xun_number:xun_number,info_number:info_number};
	var url = "{{URL('admin/config/inquiry/save')}}";
	var result = puppet.myajax('post',url,data,false);
	if(result.code == 1){
		layer.msg(result.msg,{icon:2});
		return false;
	}else{
		layer.msg(result.msg,{icon:1});
		setTimeout('window.location.reload()',1000);
	}
}

</script>
@endsection